package mall.model.vo;

/*
 *
 * @author Yonni
 * @version 1.8.0_201
 * @date 2020-05-30 15:33
 *
 * */

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/*
* 后台管理系统订单详情
* */
public class OrderInfoVO {
    private Integer id;
    private Double amount;
    private Integer num;
    private Integer goodsDetailId;
    private Integer state;
    private String goods;
    private List<SpecVO> spec;
    private List<StatesVO> states = Arrays.asList(new StatesVO(0, "未付款"),
            new StatesVO(1, "未发货"),
            new StatesVO(2, "已发货"),
            new StatesVO(3, "已完成订单"));
    private CurStateVO curState = new CurStateVO();
    private CurSpecVO curSpec = new CurSpecVO();

    public CurStateVO getCurState() {
        return curState;
    }

    public void setCurState(CurStateVO curState) {
        this.curState = curState;
    }

    public CurSpecVO getCurSpec() {
        return curSpec;
    }

    public void setCurSpec(CurSpecVO curSpec) {
        this.curSpec = curSpec;
    }

    public List<StatesVO> getStates() {
        return states;
    }

    public void setStates(List<StatesVO> states) {
        this.states = states;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getGoodsDetailId() {
        return goodsDetailId;
    }

    /*
    * 两个字段的值相等
    * */
    public void setGoodsDetailId(Integer goodsDetailId) {
        this.goodsDetailId = goodsDetailId;
        curSpec.setId(goodsDetailId);
    }

    public Integer getState() {
        return state;
    }

    /*
    * 两个字段的值相等
    * */
    public void setState(Integer state) {
        this.state = state;
        curState.setId(state);
    }

    public String getGoods() {
        return goods;
    }

    public void setGoods(String goods) {
        this.goods = goods;
    }

    public List<SpecVO> getSpec() {
        return spec;
    }

    public void setSpec(List<SpecVO> spec) {
        this.spec = spec;
    }
}


